package com.shr.netease;

import java.util.Scanner;

public class Main5 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int x = sc.nextInt();
		int f = sc.nextInt();
		int d = sc.nextInt();
		int p = sc.nextInt();
		if(d / x < f)
			System.out.println(d / x);
		else{
			System.out.println(f + (d - f * x) / (p + x)) ;
		}
		sc.close();
	}
}
